2. About me:
Sadayuki Furuhashi (@frsyki)
Diskless network system
VIVER
kumofs
Distributed key-value store
MessagePack
Cross-language communication library
University of Tsukuba
Master’s cource in Computer Science
supported by “Mitoh” project run by IPA, Information-technology Promotion Agancy, Japan
Projects:
3. About me:
Sadayuki Furuhashi
Diskless network system
VIVER
kumofs
Distributed key-value store
MessagePack
Cross-language communication library
University of Tsukuba
Master’s cource in Computer Science
supported by “Mitoh” project run by IPA, Information-technology Promotion Agancy, Japan
Projects:
5. What s kumofs?
• Distributed key-value store
• Get, Set, Delete and CAS (Compare-And-Swap)
• Linear scalability as servers added
• both read and write throughput scales-out
• dynamic rebalancing without any impacts on
applications
• Optimized for read-latency
• always zero-hop
• No SPOF
8. Shows and manages hundreds of photos smoothly
> gives lots of accesses on metadata servers
http://yapcasia2009.ficia.com/pl/album/7BF0E66A-A35F-11DE-966B-860A873069EA
9. Why kumofs?
• Need to manage heavy random reads and writes
• Need low latency for user-experience
• Need elastic scalability
• builds small cluster at the first
• enlarges it when number of users increases
• “I won’t wakeup at midnight!”
• Systems that have SPOF rushes administrators to
recover crashed servers even if it’s at midnight.
28. Tools
Written in Ruby
> automates operation tasks
> easy to implement
> easy to customize
kumoctl
kumostat
kumotop
MessagePack-RPC
Asynchronous RPC library
Cross-language RPC
29. Tools
Written in Ruby
> automates operation tasks
> easy to implement
> easy to customize
kumoctl
kumostat
kumotop
MessagePack-RPC
Asynchronous RPC library
Cross-language RPC
MessagePack
30. What s MessagePack?
• Binary-based object serialization format
• fast and small
• Cross-language
• Java, C++, Ruby, Python, Erlang, Haskell, ...
• Dynamic typing like JSON,Avro, etc. (Unlike Thrift)
• type-system is compatible with JSON
• Streaming deserialization
32. It's like JSON, but very fast and small.
MessagePack?
Faster!
MessagePack for Java
33. require 'msgpack' # gem install “msgpack"
msg = [1,2,3].to_msgpack #=> "x93x01x02x03"
MessagePack.unpack(msg) #=> [1,2,3]
MessagePack?
It's like JSON, but very fast and small.
34. require 'msgpack' # gem install “msgpack"
u = MessagePack::Unpacker.new($stdin)
u.each do |obj|
puts obj.to_json
end
MessagePack?
It's like JSON, but very fast and small.
35. MessagePack?
Annotation + dynamic code generation in Java
@MessagePackMessage
public static class MyClass {
public String str;
public double num;
@MessagePackOptional
public int flag = 0;
}
38. What s MessagePack-RPC?
• Cross-language messaging library
• Java, C++, Ruby, Python, Erlang, Haskell, ...
• Simple protocol
• 3 messages: Request, Response and Notify
39. What s MessagePack-RPC?
• Asynchronous RPC with parallel pipelining
• Concurrent communication over multiple servers
• Connection pooling
• omits overheads of reconnecting
• Concept of Future
• hides complicated event-driven I/O
• Concept of Session
• hides transport connections
• Dynamic typing
42. Client Server
Pipelining
heavy task
light task
Examples:
・HTTP/1.1 pipelining
・Thrift
・SOAP
Heavy task may keep
light tasks waiting
> makes parallelism worse
must be
sorted
56. Conclusion
• Kumofs - Distributed key-value store
> Optimized for low latency
always zero-hop
> No SPOF
> Scales-out without any impacts on
applications
Gateway hides cluster configuration
Consistency control algorithm